home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / games2 / cyberspc.lha / CS-Install / CS-Install.english < prev    next >
Text File  |  1996-02-13  |  12KB  |  441 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;;
  3. ;;;  ShowCopyrightMessage procedure
  4. ;;;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. (procedure ShowCopyrightMessage
  7.     (message "Cyberspace:    The first Computersimulationgame\n\n"
  8.         "Version" installVersion "     © 1996 Cyberspace D-Zign System \n\n"
  9.         "This program is SHAREWARE and all rights reserved ."
  10.     )
  11. )
  12.  
  13. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  14. ;;;
  15. ;;;  CompleteStep procedure
  16. ;;;
  17. ;;;  Shows how much of the work is completed.
  18. ;;;
  19. ;;;  Uses: completeLevel        Percent of work already done
  20. ;;;        completeIncrement    Percent to add for this step
  21. ;;;
  22. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  23. (procedure CompleteStep
  24.     (set completeLevel (+ completeLevel completeIncrement))
  25.     (complete completeLevel)
  26. )
  27.  
  28.  
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30. ;;;
  31. ;;;  SelectInstallDir procedure
  32. ;;;
  33. ;;;  Allows the user to select an installation directory (full path),
  34. ;;;  which will be stored in the installDir variable.
  35. ;;;
  36. ;;;  Uses:  installDir      old installation directory path
  37. ;;;
  38. ;;;  Sets:  installDir      installation directory path
  39. ;;;
  40. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  41. (set installDir "Games:")
  42. (procedure SelectInstallDir
  43.     (set installDirParent (pathonly installDir))
  44.  
  45.     ((set installDirParent (expandpath (askdir
  46.         (prompt "Please select the installation directory. "
  47.             "A drawer Cyberspace will be created."
  48.         )
  49.         (help "Cyberspace is installed in a directory called `Cyberspace'. "
  50.               "For example, sounds go into `Cyberspace/snd', text "
  51.               "in `Cyberspace/text' and so on.\n\n"
  52.               "A typical place for Cyberspace is something like "
  53.               "`Games:Cyberspace' or something similar. In this "
  54.               "example you should select the directory "
  55.               "`Games:'.\n\n"
  56.               @askdir-help
  57.         )
  58.         (default (pathonly installDir))
  59.         (newpath)
  60.         )))
  61.  
  62.     (CompleteStep)
  63.  
  64.     (set installDir (tackon installDirParent "Cyberspace"))
  65.  
  66.     (message "Installing Cyberspace in " installDir ".\n\n"
  67.         "sounds will be in " (tackon installDir "snd")
  68.         ", texts in " (tackon installDir "text")
  69.         ", brushes in " (tackon installDir "brush")
  70.         ", and so on."
  71.     ))
  72.     (set @default-dest installDir)
  73. )
  74.  
  75.  
  76. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  77. ;;;
  78. ;;;  SelectLHAProgram procedure
  79. ;;;
  80. ;;;  Lets the user select the LHA binary; sets the variable lhaProgram.
  81. ;;;
  82. ;;;  Sets: lhaProgram   path of LhA binary
  83. ;;;
  84. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  85. (procedure SelectLHAProgram
  86.  
  87.     (set l 1)
  88.     (while l
  89.     (   (set lhaProgram (askfile
  90.         (prompt "Please select your LhA program.")
  91.         (help "Unfortunately the Installer program ignores "
  92.           "your path settings. Thus I need to know the "
  93.           "complete path of your LhA program.\n\n"
  94.           @askfile-help
  95.         )
  96.         (default "LhA")
  97.     ))
  98.     (if (exists lhaProgram)
  99.     (   (set l 0)
  100.     ))
  101.     ))
  102.     (CompleteStep)
  103. )
  104.  
  105.  
  106. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  107. ;;;
  108. ;;;  UnpackArchives procedure
  109. ;;;
  110. ;;;  Allows the user to select and unpack LhA archives.
  111. ;;;
  112. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  113. (procedure UnpackArchivesHarddisk
  114.     ((SelectLHAProgram)
  115.     (CompleteStep)
  116.  
  117.     (message "Installer will create all directories needed for the game. "
  118.         "After this action he will decrypt all files into the dirs. "
  119.     )
  120.     (makedir installDir)
  121.     (set installDirStandard installDir)
  122.     (if (<> (substr installDir (- (strlen installDir) 1)) "/")
  123.         ((set installDir (cat installDir "/"))
  124.     ))
  125.     (set installDirSound (cat installDir "snd"))
  126.     (set installDirGfx (cat installDir "gfx"))
  127.     (set installDirText (cat installDir "text"))
  128.     (set installDirBrush (cat installDir "brush"))
  129.     (makedir installDirSound)
  130.     (makedir installDirGfx)
  131.     (makedir installDirText)
  132.     (makedir installDirBrush)
  133.     (set installDirSound (cat installDirSound "/"))
  134.     (set installDirGfx (cat installDirGfx "/"))
  135.     (set installDirText (cat installDirText "/"))
  136.     (set installDirBrush (cat installDirBrush "/"))
  137.     (CompleteStep)
  138.  
  139.     (set lhaCommand (cat lhaProgram " x \"%s\" " installDir))
  140.  
  141.     ((if (exists "Main.lha")
  142.         ((set installArchive "Main.lha"))
  143.         ((set installArchive "CyberspaceInstall1:Main.lha"))
  144.         )
  145.     )
  146.     (if (run (lhaCommand installArchive)
  147.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  148.         )
  149.         ((abort "\n\n" (lhaCommand installArchive)
  150.         "\n\nshowed an error."
  151.         ))
  152.     )
  153.     (CompleteStep)
  154.  
  155.     (set lhaCommand (cat lhaProgram " x \"%s\" " installDirSound))
  156.     (if (exists "Sounds.lha")
  157.         ((set installArchive "Sounds.lha"))
  158.         ((if (exists "CyberspaceInstall1:Sounds.lha")
  159.             ((set installArchive "CyberspaceInstall1:Sounds.lha"))
  160.             ((set installArchive "CyberspaceInstall2:Sounds.lha"))
  161.             )
  162.         )
  163.  
  164.     )
  165.     (if (run (lhaCommand installArchive)
  166.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  167.         )
  168.         ((abort "\n\n" (lhaCommand installArchive)
  169.         "\n\nshowed an error."
  170.         ))
  171.     )
  172.     (CompleteStep)
  173.  
  174.     (set lhaCommand (cat lhaProgram " x \"%s\" " installDirText))
  175.     ((if (exists "Text.lha")
  176.         ((set installArchive "Text.lha"))
  177.         ((set installArchive "CyberspaceInstall1:Text.lha"))
  178.         )
  179.     )
  180.     (if (run (lhaCommand installArchive)
  181.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  182.         )
  183.         ((abort "\n\n" (lhaCommand installArchive)
  184.         "\n\nshowed an error."
  185.         ))
  186.     )
  187.     (CompleteStep)
  188.  
  189.     (set lhaCommand (cat lhaProgram " x \"%s\" " installDirBrush))
  190.     ((if (exists "Gfx.lha")
  191.         ((set installArchive "Gfx.lha"))
  192.         ((set installArchive "CyberspaceInstall1:Gfx.lha"))
  193.         )
  194.     )
  195.     (if (run (lhaCommand installArchive)
  196.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  197.         )
  198.         ((abort "\n\n" (lhaCommand installArchive)
  199.         "\n\nshowed an error."
  200.         ))
  201.     )
  202.     (CompleteStep)
  203.     )
  204. )
  205.  
  206.  
  207. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  208. ;;;
  209. ;;;  UnpackArchives procedure
  210. ;;;
  211. ;;;  Allows the user to select and unpack LhA archives.
  212. ;;;
  213. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  214. (procedure UnpackArchivesDisk
  215.     ((SelectLHAProgram)
  216.     (CompleteStep)
  217.  
  218.     (message "Installer will format your disks before using it. "
  219.     )
  220.  
  221.     (set formatCommand (cat "format drive df0: name \"%s\" NOICONS"))
  222.     (set installCommand (cat "install df0:"))
  223.  
  224.     (message "Insert a blank disk into df0:, it will be formatted. "
  225.         "This disk will be the boot disk, called MAIN."
  226.     )
  227.     (if (run (formatCommand "Cyberspace")
  228.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  229.         )
  230.         ((abort "\n\n" (formatCommand "Cyberspace")
  231.         "\n\nshowed an error."
  232.         ))
  233.     )
  234.     (if (run (installCommand)
  235.         (prompt ("\n\nInstalling \"%s\" ..."))
  236.         )
  237.         ((abort "\n\n" (installCommand)
  238.         "\n\nshowed an error."
  239.         ))
  240.     )
  241.     (set lhaCommand (cat lhaProgram " x \"%s\" Cyberspace:"))
  242.     ((if (exists "Main.lha")
  243.         ((run ("copy Main.lha t:Archive.lha")))
  244.         ((run ("copy CyberspaceInstall1:Main.lha t:Archive.lha")))
  245.         )
  246.     )
  247.     (message "Insert the new formatted disk called MAIN into any drive:")
  248.     (set installArchive "t:Archive.lha")
  249.     (if (run (lhaCommand installArchive)
  250.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  251.         )
  252.         ((abort "\n\n" (lhaCommand installArchive)
  253.         "\n\nshowed an error."
  254.         ))
  255.     )
  256.     (CompleteStep)
  257.  
  258.     (message "Insert a blank disk into df0:, it will be formatted. "
  259.         "This disk will be the boot disk, called SOUNDS."
  260.     )
  261.     (if (run (formatCommand "CSSound")
  262.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  263.         )
  264.         ((abort "\n\n" (formatCommand "CSSound")
  265.         "\n\nshowed an error."
  266.         ))
  267.     )
  268.     (set lhaCommand (cat lhaProgram " x \"%s\" CSSound:"))
  269.     (if (exists "Sounds.lha")
  270.         ((run ("copy Sounds.lha t:Archive.lha")))
  271.         ((if (exists "CyberspaceInstall1:Sounds.lha")
  272.             ((run ("copy CyberspaceInstall1:Sounds.lha t:Archive.lha")))
  273.             ((run ("copy CyberspaceInstall2:Sounds.lha t:Archive.lha")))
  274.             )
  275.         )
  276.     )
  277.     (message "Insert the new formatted disk called SOUNDS into any drive:")
  278.     (set installArchive "t:Archive.lha")
  279.     (if (run (lhaCommand installArchive)
  280.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  281.         )
  282.         ((abort "\n\n" (lhaCommand installArchive)
  283.         "\n\nshowed an error."
  284.         ))
  285.     )
  286.     (CompleteStep)
  287.  
  288.     (message "Insert a blank disk into df0:, it will be formatted. "
  289.         "This disk will be the boot disk, called TEXT."
  290.     )
  291.     (if (run (formatCommand "CSText")
  292.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  293.         )
  294.         ((abort "\n\n" (formatCommand "CSText")
  295.         "\n\nshowed an error."
  296.         ))
  297.     )
  298.     (set lhaCommand (cat lhaProgram " x \"%s\" CSText:"))
  299.     ((if (exists "Text.lha")
  300.         ((run ("copy Text.lha t:Archive.lha")))
  301.         ((run ("copy CyberspaceInstall1:Text.lha t:Archive.lha")))
  302.         )
  303.     )
  304.     (message "Insert the new formatted disk called TEXT into any drive:")
  305.     (set installArchive "t:Archive.lha")
  306.     (if (run (lhaCommand installArchive)
  307.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  308.         )
  309.         ((abort "\n\n" (lhaCommand installArchive)
  310.         "\n\nshowed an error."
  311.         ))
  312.     )
  313.     (CompleteStep)
  314.  
  315.     (message "Insert a blank disk into df0:, it will be formatted. "
  316.         "This disk will be the boot disk, called GRAFIK."
  317.     )
  318.     (if (run (formatCommand "CSGfx")
  319.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  320.         )
  321.         ((abort "\n\n" (formatCommand "CSGfx")
  322.         "\n\nshowed an error."
  323.         ))
  324.     )
  325.     (set lhaCommand (cat lhaProgram " x \"%s\" CSGfx:"))
  326.     ((if (exists "Gfx.lha")
  327.         ((run ("copy Gfx.lha t:Archive.lha")))
  328.         ((run ("copy CyberspaceInstall1:Gfx.lha t:Archive.lha")))
  329.         )
  330.     )
  331.     (message "Insert the new formatted disk called GRAFIK into any drive:")
  332.     (set installArchive "t:Archive.lha")
  333.     (if (run (lhaCommand installArchive)
  334.         (prompt ("\n\nUnpacking \"%s\" ..." installArchive))
  335.         )
  336.         ((abort "\n\n" (lhaCommand installArchive)
  337.         "\n\nshowed an error."
  338.         ))
  339.     )
  340.     (CompleteStep)
  341.     )
  342. )
  343.  
  344.  
  345. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  346. ;;;
  347. ;;;  ActionDiskInstallation procedure
  348. ;;;
  349. ;;;  Executes the work which is unique for installing a new package:
  350. ;;;  Unpacking the archive.
  351. ;;;
  352. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  353. (procedure ActionDiskInstallation
  354.     (UnpackArchivesDisk)
  355.     (CompleteStep)
  356.     ((if (exists "standard.dat")
  357.         ((run ("copy standard.dat Cyberspace:")))
  358.         ((run ("copy CyberspaceInstall1:standard.dat Cyberspace:")))
  359.         )
  360.     )
  361.     (complete 100)
  362.     (message "Cyberspace is completely installed to 4 disks."
  363.         "Boot with the MAIN-disk and insert the others,"
  364.         "if requested"
  365.     )
  366. )
  367.  
  368.  
  369. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  370. ;;;
  371. ;;;  ActionHarddiskInstallation procedure
  372. ;;;
  373. ;;;  Executes the work which is unique for installing a new package:
  374. ;;;  Unpacking the archive.
  375. ;;;
  376. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  377. (procedure ActionHarddiskInstallation
  378.     (SelectInstallDir)
  379.     (UnpackArchivesHarddisk)
  380.     (CompleteStep)
  381.     ((if (exists "standard.dat")
  382.         ((set copyStandard (cat "copy standard.dat " installDirStandard)))
  383.         ((set copyStandard (cat "copy CyberspaceInstall1:standard.dat " installDirStandard)))
  384.         )
  385.     )
  386.     ((run (copyStandard)))
  387.     (complete 100)
  388.     (message "Cyberspace is completely installed in one directory called Cyberspace."
  389.     )
  390. )
  391.  
  392.  
  393. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  394. ;;;
  395. ;;;   main program
  396. ;;;
  397. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  398.  
  399. (ShowCopyrightMessage)
  400.  
  401. (   (complete 0)
  402.  
  403.     (set repeatIt 1)
  404.     (set defaultChoice 1)
  405.     (while repeatIt
  406.     (   (set actionChoice (askchoice
  407.         (prompt "Please select actions to perform.")
  408.         (help "Select \"Install to disks\", if you want "
  409.           "to play Cyberspace from disks. You will need "
  410.           "4 disks to install on it.\n\n"
  411.           "Select \"Install to harddisk\", if you want to "
  412.           "to play Cyberspace from harddisks. You will need "
  413.           "3 MB free disk space.\n\n"
  414.           "Select \"Done\", if you want to exit.\n\n"
  415.           @askchoices-help
  416.         )
  417.         (choices "Install to disks."
  418.              "Install to harddisk."
  419.              "Done"
  420.         )
  421.         (default defaultChoice)
  422.     ))
  423.  
  424.     (select actionChoice
  425.     (   (set completeLevel 0)
  426.         (set completeIncrement 10)
  427.         (ActionDiskInstallation)
  428.         (set repeatIt 0)
  429.     )
  430.     (   (set completeLevel 0)
  431.         (set completeIncrement 10)
  432.         (ActionHarddiskInstallation)
  433.         (set repeatIt 0)
  434.     )
  435.     (   (set repeatIt 0)
  436.     ))
  437.     ))
  438.  
  439.     (complete 100)
  440. )
  441.